unit uEtiqTransf;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uPai_new, FMTBcd, DBClient, Provider, DB, SqlExpr, StdCtrls,
  Mask, DBCtrls, Menus, Buttons, ExtCtrls, MMJPanel, Grids, DBGrids;

type
  TfEtiqTransf = class(TfPai_new)
    Label1: TLabel;
    DBGrid1: TDBGrid;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    DBGrid2: TDBGrid;
    Label5: TLabel;
    sdsOfOrigem: TSQLDataSet;
    dspOfOrigem: TDataSetProvider;
    cdsOfOrigem: TClientDataSet;
    edOfDet: TEdit;
    edOf: TEdit;
    BitBtn1: TBitBtn;
    procedure btnIncluirClick(Sender: TObject);
    procedure DBGrid1CellClick(Column: TColumn);
    procedure btnGravarClick(Sender: TObject);
    procedure CheckBox2Click(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fEtiqTransf: TfEtiqTransf;

implementation

uses udm;

{$R *.dfm}

procedure TfEtiqTransf.btnIncluirClick(Sender: TObject);
begin
  inherited;
  {CheckBox1.Checked;
  DBEdit1.SetFocus;}
end;

procedure TfEtiqTransf.DBGrid1CellClick(Column: TColumn);
begin
  inherited;
  {if (dm.cdsPalletSTATUS.AsString = 'A') then
  begin
    CheckBox1.Checked := True;
  end
  else begin
    CheckBox1.Checked := False;
  end;
  }
end;

procedure TfEtiqTransf.btnGravarClick(Sender: TObject);
begin
  {if (CheckBox1.Checked) then
    dm.cdsPalletSTATUS.AsString := 'A'
  else
    dm.cdsPalletSTATUS.AsString := 'I';
  inherited;}
end;

procedure TfEtiqTransf.CheckBox2Click(Sender: TObject);
var str: string;
begin
  inherited;
  {if (CheckBox2.Checked) then
  begin
    str := 'select PALLETID, DESCRICAO, STATUS from L_PALLET ';
  end
  else begin
    str := 'select PALLETID, DESCRICAO, STATUS from L_PALLET WHERE STATUS = ' + QuotedStr('A');
  end;
  if (dm.cdsPallet.Active) then
    dm.cdsPallet.Close;
  dm.cdsPallet.CommandText := str;
  dm.cdsPallet.Open;
  }
end;

procedure TfEtiqTransf.CheckBox1Click(Sender: TObject);
begin
  inherited;
  {if (dm.cdsPallet.State in [dsBrowse]) then
    dm.cdsPallet.Edit;
  if (CheckBox1.Checked) then
    dm.cdsPalletSTATUS.AsString := 'A'
  else
    dm.cdsPalletSTATUS.AsString := 'I'
    }
end;

procedure TfEtiqTransf.BitBtn1Click(Sender: TObject);
  var str: string;
begin
  //inherited;
  {str := 'SELECT * FROM ATS_ETIQOF WHERE EOF_STATUS = 3'
  str := str + ' AND '

   }
end;

end.
